
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module fgcp.server</title>
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="fgcp.html"><font color="#ffffff">fgcp</font></a>.server</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="http://code.google.com/p/fgcp-client-api/source/browse/fgcp/server.py">server.py</a></font></td></tr></table>
    <p><tt>Fujitsu&nbsp;Global&nbsp;Cloud&nbsp;Platform&nbsp;(FGCP)&nbsp;API&nbsp;Server(s)<br>
&nbsp;<br>
Example:&nbsp;[see&nbsp;tests/test_*.py&nbsp;for&nbsp;more&nbsp;examples]<br>
&nbsp;<br>
#&nbsp;Connect&nbsp;without&nbsp;client&nbsp;certificate&nbsp;to&nbsp;region&nbsp;'test'<br>
from&nbsp;fgcp.resource&nbsp;import&nbsp;FGCPVDataCenter<br>
vdc&nbsp;=&nbsp;FGCPVDataCenter('client.pem',&nbsp;'test')<br>
&nbsp;<br>
#&nbsp;Do&nbsp;typical&nbsp;resource&nbsp;actions&nbsp;-&nbsp;updates&nbsp;are&nbsp;not&nbsp;supported&nbsp;here<br>
vsystem&nbsp;=&nbsp;vdc.get_vsystem('Demo&nbsp;System')<br>
vsystem.show_status()<br>
for&nbsp;vserver&nbsp;in&nbsp;vsystem.vservers:<br>
&nbsp;&nbsp;&nbsp;&nbsp;#result&nbsp;=&nbsp;vserver.backup(wait=True)<br>
...<br>
&nbsp;<br>
Note:&nbsp;you&nbsp;need&nbsp;to&nbsp;unzip&nbsp;the&nbsp;file&nbsp;'fixtures.zip'&nbsp;in&nbsp;tests/fixtures&nbsp;first</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="httplib.html">httplib</a><br>
</td><td width="25%" valign=top><a href="os.html">os</a><br>
</td><td width="25%" valign=top><a href="re.html">re</a><br>
</td><td width="25%" valign=top><a href="time.html">time</a><br>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="fgcp.html#FGCPError">fgcp.FGCPError</a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="fgcp.server.html#FGCPServerError">FGCPServerError</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="fgcp.server.html#FGCPTestServer">FGCPTestServer</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="fgcp.server.html#FGCPTestServerWithFixtures">FGCPTestServerWithFixtures</a>
</font></dt><dt><font face="helvetica, arial"><a href="fgcp.server.html#FGCPTestServerWithRegistry">FGCPTestServerWithRegistry</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="httplib.html#HTTPConnection">httplib.HTTPConnection</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="fgcp.server.html#FGCPUnsecureRelayServer">FGCPUnsecureRelayServer</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="httplib.html#HTTPSConnection">httplib.HTTPSConnection</a>(<a href="httplib.html#HTTPConnection">httplib.HTTPConnection</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="fgcp.server.html#FGCPRealServer">FGCPRealServer</a>
</font></dt><dt><font face="helvetica, arial"><a href="fgcp.server.html#FGCPRelayServer">FGCPRelayServer</a>
</font></dt></dl>
</dd>
</dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="FGCPRealServer">class <strong>FGCPRealServer</strong></a>(<a href="httplib.html#HTTPSConnection">httplib.HTTPSConnection</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Connect&nbsp;to&nbsp;the&nbsp;real&nbsp;API&nbsp;server&nbsp;for&nbsp;the&nbsp;Fujitsu&nbsp;Global&nbsp;Cloud&nbsp;Platform&nbsp;in&nbsp;this&nbsp;region<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="fgcp.server.html#FGCPRealServer">FGCPRealServer</a></dd>
<dd><a href="httplib.html#HTTPSConnection">httplib.HTTPSConnection</a></dd>
<dd><a href="httplib.html#HTTPConnection">httplib.HTTPConnection</a></dd>
</dl>
<hr>
Methods inherited from <a href="httplib.html#HTTPSConnection">httplib.HTTPSConnection</a>:<br>
<dl><dt><a name="FGCPRealServer-__init__"><strong>__init__</strong></a>(self, host, port<font color="#909090">=None</font>, key_file<font color="#909090">=None</font>, cert_file<font color="#909090">=None</font>, strict<font color="#909090">=None</font>, timeout<font color="#909090">=&lt;object object&gt;</font>, source_address<font color="#909090">=None</font>)</dt></dl>

<dl><dt><a name="FGCPRealServer-connect"><strong>connect</strong></a>(self)</dt><dd><tt>Connect&nbsp;to&nbsp;a&nbsp;host&nbsp;on&nbsp;a&nbsp;given&nbsp;(SSL)&nbsp;port.</tt></dd></dl>

<hr>
Data and other attributes inherited from <a href="httplib.html#HTTPSConnection">httplib.HTTPSConnection</a>:<br>
<dl><dt><strong>default_port</strong> = 443</dl>

<hr>
Methods inherited from <a href="httplib.html#HTTPConnection">httplib.HTTPConnection</a>:<br>
<dl><dt><a name="FGCPRealServer-close"><strong>close</strong></a>(self)</dt><dd><tt>Close&nbsp;the&nbsp;connection&nbsp;to&nbsp;the&nbsp;HTTP&nbsp;server.</tt></dd></dl>

<dl><dt><a name="FGCPRealServer-endheaders"><strong>endheaders</strong></a>(self, message_body<font color="#909090">=None</font>)</dt><dd><tt>Indicate&nbsp;that&nbsp;the&nbsp;last&nbsp;header&nbsp;line&nbsp;has&nbsp;been&nbsp;sent&nbsp;to&nbsp;the&nbsp;server.<br>
&nbsp;<br>
This&nbsp;method&nbsp;sends&nbsp;the&nbsp;request&nbsp;to&nbsp;the&nbsp;server.&nbsp;&nbsp;The&nbsp;optional<br>
message_body&nbsp;argument&nbsp;can&nbsp;be&nbsp;used&nbsp;to&nbsp;pass&nbsp;a&nbsp;message&nbsp;body<br>
associated&nbsp;with&nbsp;the&nbsp;request.&nbsp;&nbsp;The&nbsp;message&nbsp;body&nbsp;will&nbsp;be&nbsp;sent&nbsp;in<br>
the&nbsp;same&nbsp;packet&nbsp;as&nbsp;the&nbsp;message&nbsp;headers&nbsp;if&nbsp;it&nbsp;is&nbsp;string,&nbsp;otherwise&nbsp;it&nbsp;is<br>
sent&nbsp;as&nbsp;a&nbsp;separate&nbsp;packet.</tt></dd></dl>

<dl><dt><a name="FGCPRealServer-getresponse"><strong>getresponse</strong></a>(self, buffering<font color="#909090">=False</font>)</dt><dd><tt>Get&nbsp;the&nbsp;response&nbsp;from&nbsp;the&nbsp;server.</tt></dd></dl>

<dl><dt><a name="FGCPRealServer-putheader"><strong>putheader</strong></a>(self, header, *values)</dt><dd><tt>Send&nbsp;a&nbsp;request&nbsp;header&nbsp;line&nbsp;to&nbsp;the&nbsp;server.<br>
&nbsp;<br>
For&nbsp;example:&nbsp;h.<a href="#FGCPRealServer-putheader">putheader</a>('Accept',&nbsp;'text/html')</tt></dd></dl>

<dl><dt><a name="FGCPRealServer-putrequest"><strong>putrequest</strong></a>(self, method, url, skip_host<font color="#909090">=0</font>, skip_accept_encoding<font color="#909090">=0</font>)</dt><dd><tt>Send&nbsp;a&nbsp;request&nbsp;to&nbsp;the&nbsp;server.<br>
&nbsp;<br>
`method'&nbsp;specifies&nbsp;an&nbsp;HTTP&nbsp;request&nbsp;method,&nbsp;e.g.&nbsp;'GET'.<br>
`url'&nbsp;specifies&nbsp;the&nbsp;object&nbsp;being&nbsp;requested,&nbsp;e.g.&nbsp;'/index.html'.<br>
`skip_host'&nbsp;if&nbsp;True&nbsp;does&nbsp;not&nbsp;add&nbsp;automatically&nbsp;a&nbsp;'Host:'&nbsp;header<br>
`skip_accept_encoding'&nbsp;if&nbsp;True&nbsp;does&nbsp;not&nbsp;add&nbsp;automatically&nbsp;an<br>
&nbsp;&nbsp;&nbsp;'Accept-Encoding:'&nbsp;header</tt></dd></dl>

<dl><dt><a name="FGCPRealServer-request"><strong>request</strong></a>(self, method, url, body<font color="#909090">=None</font>, headers<font color="#909090">={}</font>)</dt><dd><tt>Send&nbsp;a&nbsp;complete&nbsp;request&nbsp;to&nbsp;the&nbsp;server.</tt></dd></dl>

<dl><dt><a name="FGCPRealServer-send"><strong>send</strong></a>(self, data)</dt><dd><tt>Send&nbsp;`data'&nbsp;to&nbsp;the&nbsp;server.</tt></dd></dl>

<dl><dt><a name="FGCPRealServer-set_debuglevel"><strong>set_debuglevel</strong></a>(self, level)</dt></dl>

<dl><dt><a name="FGCPRealServer-set_tunnel"><strong>set_tunnel</strong></a>(self, host, port<font color="#909090">=None</font>, headers<font color="#909090">=None</font>)</dt><dd><tt>Sets&nbsp;up&nbsp;the&nbsp;host&nbsp;and&nbsp;the&nbsp;port&nbsp;for&nbsp;the&nbsp;HTTP&nbsp;CONNECT&nbsp;Tunnelling.<br>
&nbsp;<br>
The&nbsp;headers&nbsp;argument&nbsp;should&nbsp;be&nbsp;a&nbsp;mapping&nbsp;of&nbsp;extra&nbsp;HTTP&nbsp;headers<br>
to&nbsp;send&nbsp;with&nbsp;the&nbsp;CONNECT&nbsp;request.</tt></dd></dl>

<hr>
Data and other attributes inherited from <a href="httplib.html#HTTPConnection">httplib.HTTPConnection</a>:<br>
<dl><dt><strong>auto_open</strong> = 1</dl>

<dl><dt><strong>debuglevel</strong> = 0</dl>

<dl><dt><strong>response_class</strong> = &lt;class httplib.HTTPResponse&gt;</dl>

<dl><dt><strong>strict</strong> = 0</dl>

</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="FGCPRelayServer">class <strong>FGCPRelayServer</strong></a>(<a href="httplib.html#HTTPSConnection">httplib.HTTPSConnection</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Connect&nbsp;via&nbsp;some&nbsp;relay&nbsp;API&nbsp;server&nbsp;for&nbsp;remote&nbsp;connections,&nbsp;e.g.&nbsp;for&nbsp;Google&nbsp;App&nbsp;Engine<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="fgcp.server.html#FGCPRelayServer">FGCPRelayServer</a></dd>
<dd><a href="httplib.html#HTTPSConnection">httplib.HTTPSConnection</a></dd>
<dd><a href="httplib.html#HTTPConnection">httplib.HTTPConnection</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="FGCPRelayServer-__init__"><strong>__init__</strong></a>(self, host, port<font color="#909090">=None</font>, path<font color="#909090">=None</font>, strict<font color="#909090">=None</font>)</dt></dl>

<dl><dt><a name="FGCPRelayServer-connect"><strong>connect</strong></a>(self)</dt></dl>

<dl><dt><a name="FGCPRelayServer-getresponse"><strong>getresponse</strong></a>(self)</dt></dl>

<dl><dt><a name="FGCPRelayServer-request"><strong>request</strong></a>(self, method, url, body<font color="#909090">=None</font>, headers<font color="#909090">={}</font>)</dt></dl>

<hr>
Data and other attributes inherited from <a href="httplib.html#HTTPSConnection">httplib.HTTPSConnection</a>:<br>
<dl><dt><strong>default_port</strong> = 443</dl>

<hr>
Methods inherited from <a href="httplib.html#HTTPConnection">httplib.HTTPConnection</a>:<br>
<dl><dt><a name="FGCPRelayServer-close"><strong>close</strong></a>(self)</dt><dd><tt>Close&nbsp;the&nbsp;connection&nbsp;to&nbsp;the&nbsp;HTTP&nbsp;server.</tt></dd></dl>

<dl><dt><a name="FGCPRelayServer-endheaders"><strong>endheaders</strong></a>(self, message_body<font color="#909090">=None</font>)</dt><dd><tt>Indicate&nbsp;that&nbsp;the&nbsp;last&nbsp;header&nbsp;line&nbsp;has&nbsp;been&nbsp;sent&nbsp;to&nbsp;the&nbsp;server.<br>
&nbsp;<br>
This&nbsp;method&nbsp;sends&nbsp;the&nbsp;request&nbsp;to&nbsp;the&nbsp;server.&nbsp;&nbsp;The&nbsp;optional<br>
message_body&nbsp;argument&nbsp;can&nbsp;be&nbsp;used&nbsp;to&nbsp;pass&nbsp;a&nbsp;message&nbsp;body<br>
associated&nbsp;with&nbsp;the&nbsp;request.&nbsp;&nbsp;The&nbsp;message&nbsp;body&nbsp;will&nbsp;be&nbsp;sent&nbsp;in<br>
the&nbsp;same&nbsp;packet&nbsp;as&nbsp;the&nbsp;message&nbsp;headers&nbsp;if&nbsp;it&nbsp;is&nbsp;string,&nbsp;otherwise&nbsp;it&nbsp;is<br>
sent&nbsp;as&nbsp;a&nbsp;separate&nbsp;packet.</tt></dd></dl>

<dl><dt><a name="FGCPRelayServer-putheader"><strong>putheader</strong></a>(self, header, *values)</dt><dd><tt>Send&nbsp;a&nbsp;request&nbsp;header&nbsp;line&nbsp;to&nbsp;the&nbsp;server.<br>
&nbsp;<br>
For&nbsp;example:&nbsp;h.<a href="#FGCPRelayServer-putheader">putheader</a>('Accept',&nbsp;'text/html')</tt></dd></dl>

<dl><dt><a name="FGCPRelayServer-putrequest"><strong>putrequest</strong></a>(self, method, url, skip_host<font color="#909090">=0</font>, skip_accept_encoding<font color="#909090">=0</font>)</dt><dd><tt>Send&nbsp;a&nbsp;request&nbsp;to&nbsp;the&nbsp;server.<br>
&nbsp;<br>
`method'&nbsp;specifies&nbsp;an&nbsp;HTTP&nbsp;request&nbsp;method,&nbsp;e.g.&nbsp;'GET'.<br>
`url'&nbsp;specifies&nbsp;the&nbsp;object&nbsp;being&nbsp;requested,&nbsp;e.g.&nbsp;'/index.html'.<br>
`skip_host'&nbsp;if&nbsp;True&nbsp;does&nbsp;not&nbsp;add&nbsp;automatically&nbsp;a&nbsp;'Host:'&nbsp;header<br>
`skip_accept_encoding'&nbsp;if&nbsp;True&nbsp;does&nbsp;not&nbsp;add&nbsp;automatically&nbsp;an<br>
&nbsp;&nbsp;&nbsp;'Accept-Encoding:'&nbsp;header</tt></dd></dl>

<dl><dt><a name="FGCPRelayServer-send"><strong>send</strong></a>(self, data)</dt><dd><tt>Send&nbsp;`data'&nbsp;to&nbsp;the&nbsp;server.</tt></dd></dl>

<dl><dt><a name="FGCPRelayServer-set_debuglevel"><strong>set_debuglevel</strong></a>(self, level)</dt></dl>

<dl><dt><a name="FGCPRelayServer-set_tunnel"><strong>set_tunnel</strong></a>(self, host, port<font color="#909090">=None</font>, headers<font color="#909090">=None</font>)</dt><dd><tt>Sets&nbsp;up&nbsp;the&nbsp;host&nbsp;and&nbsp;the&nbsp;port&nbsp;for&nbsp;the&nbsp;HTTP&nbsp;CONNECT&nbsp;Tunnelling.<br>
&nbsp;<br>
The&nbsp;headers&nbsp;argument&nbsp;should&nbsp;be&nbsp;a&nbsp;mapping&nbsp;of&nbsp;extra&nbsp;HTTP&nbsp;headers<br>
to&nbsp;send&nbsp;with&nbsp;the&nbsp;CONNECT&nbsp;request.</tt></dd></dl>

<hr>
Data and other attributes inherited from <a href="httplib.html#HTTPConnection">httplib.HTTPConnection</a>:<br>
<dl><dt><strong>auto_open</strong> = 1</dl>

<dl><dt><strong>debuglevel</strong> = 0</dl>

<dl><dt><strong>response_class</strong> = &lt;class httplib.HTTPResponse&gt;</dl>

<dl><dt><strong>strict</strong> = 0</dl>

</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="FGCPServerError">class <strong>FGCPServerError</strong></a>(<a href="fgcp.html#FGCPError">fgcp.FGCPError</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="fgcp.server.html#FGCPServerError">FGCPServerError</a></dd>
<dd><a href="fgcp.html#FGCPError">fgcp.FGCPError</a></dd>
<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods inherited from <a href="fgcp.html#FGCPError">fgcp.FGCPError</a>:<br>
<dl><dt><a name="FGCPServerError-__init__"><strong>__init__</strong></a>(self, status, message)</dt></dl>

<dl><dt><a name="FGCPServerError-__str__"><strong>__str__</strong></a>(self)</dt></dl>

<hr>
Data descriptors inherited from <a href="fgcp.html#FGCPError">fgcp.FGCPError</a>:<br>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<hr>
Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><strong>__new__</strong> = &lt;built-in method __new__ of type object&gt;<dd><tt>T.<a href="#FGCPServerError-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;object&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</tt></dl>

<hr>
Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><a name="FGCPServerError-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#FGCPServerError-__delattr__">__delattr__</a>('name')&nbsp;&lt;==&gt;&nbsp;del&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="FGCPServerError-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#FGCPServerError-__getattribute__">__getattribute__</a>('name')&nbsp;&lt;==&gt;&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="FGCPServerError-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#FGCPServerError-__getitem__">__getitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;x[y]</tt></dd></dl>

<dl><dt><a name="FGCPServerError-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#FGCPServerError-__getslice__">__getslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;x[i:j]<br>
&nbsp;<br>
Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>

<dl><dt><a name="FGCPServerError-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>

<dl><dt><a name="FGCPServerError-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#FGCPServerError-__repr__">__repr__</a>()&nbsp;&lt;==&gt;&nbsp;repr(x)</tt></dd></dl>

<dl><dt><a name="FGCPServerError-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#FGCPServerError-__setattr__">__setattr__</a>('name',&nbsp;value)&nbsp;&lt;==&gt;&nbsp;x.name&nbsp;=&nbsp;value</tt></dd></dl>

<dl><dt><a name="FGCPServerError-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>

<dl><dt><a name="FGCPServerError-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>

<hr>
Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
</dl>
<dl><dt><strong>args</strong></dt>
</dl>
<dl><dt><strong>message</strong></dt>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="FGCPTestServer">class <strong>FGCPTestServer</strong></a></font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="FGCPTestServer-__init__"><strong>__init__</strong></a>(self, *args, **kwargs)</dt></dl>

<dl><dt><a name="FGCPTestServer-close"><strong>close</strong></a>(self)</dt></dl>

<dl><dt><a name="FGCPTestServer-getresponse"><strong>getresponse</strong></a>(self)</dt></dl>

<dl><dt><a name="FGCPTestServer-read"><strong>read</strong></a>(self)</dt></dl>

<dl><dt><a name="FGCPTestServer-request"><strong>request</strong></a>(self, method, uri, body, headers)</dt></dl>

<dl><dt><a name="FGCPTestServer-set_testid"><strong>set_testid</strong></a>(self, testid)</dt></dl>

<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>reason</strong> = 'OK'</dl>

<dl><dt><strong>status</strong> = 200</dl>

</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="FGCPTestServerWithFixtures">class <strong>FGCPTestServerWithFixtures</strong></a>(<a href="fgcp.server.html#FGCPTestServer">FGCPTestServer</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Connect&nbsp;to&nbsp;this&nbsp;test&nbsp;API&nbsp;server&nbsp;for&nbsp;local&nbsp;tests&nbsp;-&nbsp;updates&nbsp;are&nbsp;not&nbsp;supported<br>
&nbsp;<br>
&gt;&gt;&gt;&nbsp;from&nbsp;fgcp.resource&nbsp;import&nbsp;FGCPVDataCenter<br>
&gt;&gt;&gt;&nbsp;vdc&nbsp;=&nbsp;FGCPVDataCenter('client.pem',&nbsp;'test')<br>
&gt;&gt;&gt;&nbsp;vsystem&nbsp;=&nbsp;vdc.get_vsystem('Demo&nbsp;System')<br>
&gt;&gt;&gt;&nbsp;vsystem.show_status()&nbsp;&nbsp;&nbsp;#doctest:&nbsp;+NORMALIZE_WHITESPACE<br>
Status&nbsp;Overview&nbsp;for&nbsp;VSystem&nbsp;Demo&nbsp;System<br>
VSystem&nbsp;Demo&nbsp;System&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NORMAL<br>
PublicIP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;80.70.163.172&nbsp;&nbsp;&nbsp;ATTACHED<br>
Firewall&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Firewall&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RUNNING<br>
LoadBalancer&nbsp;&nbsp;&nbsp;&nbsp;SLB1&nbsp;&nbsp;&nbsp;&nbsp;192.168.0.211&nbsp;&nbsp;&nbsp;RUNNING<br>
VServer&nbsp;WebApp1&nbsp;192.168.0.13&nbsp;&nbsp;&nbsp;&nbsp;RUNNING<br>
VServer&nbsp;DB1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;192.168.1.12&nbsp;&nbsp;&nbsp;&nbsp;RUNNING<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VDisk&nbsp;&nbsp;&nbsp;DISK1&nbsp;&nbsp;&nbsp;NORMAL<br>
VServer&nbsp;WebApp2&nbsp;192.168.0.15&nbsp;&nbsp;&nbsp;&nbsp;RUNNING<br>
.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="FGCPTestServerWithFixtures-__init__"><strong>__init__</strong></a>(self, *args, **kwargs)</dt></dl>

<dl><dt><a name="FGCPTestServerWithFixtures-close"><strong>close</strong></a>(self)</dt></dl>

<dl><dt><a name="FGCPTestServerWithFixtures-getresponse"><strong>getresponse</strong></a>(self)</dt></dl>

<dl><dt><a name="FGCPTestServerWithFixtures-read"><strong>read</strong></a>(self)</dt></dl>

<dl><dt><a name="FGCPTestServerWithFixtures-request"><strong>request</strong></a>(self, method, uri, body, headers)</dt></dl>

<dl><dt><a name="FGCPTestServerWithFixtures-save_request"><strong>save_request</strong></a>(self, testid, body)</dt></dl>

<dl><dt><a name="FGCPTestServerWithFixtures-save_response"><strong>save_response</strong></a>(self, testid, data)</dt></dl>

<hr>
Methods inherited from <a href="fgcp.server.html#FGCPTestServer">FGCPTestServer</a>:<br>
<dl><dt><a name="FGCPTestServerWithFixtures-set_testid"><strong>set_testid</strong></a>(self, testid)</dt></dl>

<hr>
Data and other attributes inherited from <a href="fgcp.server.html#FGCPTestServer">FGCPTestServer</a>:<br>
<dl><dt><strong>reason</strong> = 'OK'</dl>

<dl><dt><strong>status</strong> = 200</dl>

</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="FGCPTestServerWithRegistry">class <strong>FGCPTestServerWithRegistry</strong></a>(<a href="fgcp.server.html#FGCPTestServer">FGCPTestServer</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="FGCPTestServerWithRegistry-__init__"><strong>__init__</strong></a>(self, filePath<font color="#909090">='fgcp_demo_system.txt'</font>)</dt></dl>

<hr>
Methods inherited from <a href="fgcp.server.html#FGCPTestServer">FGCPTestServer</a>:<br>
<dl><dt><a name="FGCPTestServerWithRegistry-close"><strong>close</strong></a>(self)</dt></dl>

<dl><dt><a name="FGCPTestServerWithRegistry-getresponse"><strong>getresponse</strong></a>(self)</dt></dl>

<dl><dt><a name="FGCPTestServerWithRegistry-read"><strong>read</strong></a>(self)</dt></dl>

<dl><dt><a name="FGCPTestServerWithRegistry-request"><strong>request</strong></a>(self, method, uri, body, headers)</dt></dl>

<dl><dt><a name="FGCPTestServerWithRegistry-set_testid"><strong>set_testid</strong></a>(self, testid)</dt></dl>

<hr>
Data and other attributes inherited from <a href="fgcp.server.html#FGCPTestServer">FGCPTestServer</a>:<br>
<dl><dt><strong>reason</strong> = 'OK'</dl>

<dl><dt><strong>status</strong> = 200</dl>

</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="FGCPUnsecureRelayServer">class <strong>FGCPUnsecureRelayServer</strong></a>(<a href="httplib.html#HTTPConnection">httplib.HTTPConnection</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Connect&nbsp;via&nbsp;some&nbsp;relay&nbsp;API&nbsp;server&nbsp;for&nbsp;remote&nbsp;connections,&nbsp;e.g.&nbsp;for&nbsp;localhost<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="FGCPUnsecureRelayServer-__init__"><strong>__init__</strong></a>(self, host, port<font color="#909090">=None</font>, path<font color="#909090">=None</font>, strict<font color="#909090">=None</font>)</dt></dl>

<dl><dt><a name="FGCPUnsecureRelayServer-connect"><strong>connect</strong></a>(self)</dt></dl>

<dl><dt><a name="FGCPUnsecureRelayServer-getresponse"><strong>getresponse</strong></a>(self)</dt></dl>

<dl><dt><a name="FGCPUnsecureRelayServer-request"><strong>request</strong></a>(self, method, url, body<font color="#909090">=None</font>, headers<font color="#909090">={}</font>)</dt></dl>

<hr>
Methods inherited from <a href="httplib.html#HTTPConnection">httplib.HTTPConnection</a>:<br>
<dl><dt><a name="FGCPUnsecureRelayServer-close"><strong>close</strong></a>(self)</dt><dd><tt>Close&nbsp;the&nbsp;connection&nbsp;to&nbsp;the&nbsp;HTTP&nbsp;server.</tt></dd></dl>

<dl><dt><a name="FGCPUnsecureRelayServer-endheaders"><strong>endheaders</strong></a>(self, message_body<font color="#909090">=None</font>)</dt><dd><tt>Indicate&nbsp;that&nbsp;the&nbsp;last&nbsp;header&nbsp;line&nbsp;has&nbsp;been&nbsp;sent&nbsp;to&nbsp;the&nbsp;server.<br>
&nbsp;<br>
This&nbsp;method&nbsp;sends&nbsp;the&nbsp;request&nbsp;to&nbsp;the&nbsp;server.&nbsp;&nbsp;The&nbsp;optional<br>
message_body&nbsp;argument&nbsp;can&nbsp;be&nbsp;used&nbsp;to&nbsp;pass&nbsp;a&nbsp;message&nbsp;body<br>
associated&nbsp;with&nbsp;the&nbsp;request.&nbsp;&nbsp;The&nbsp;message&nbsp;body&nbsp;will&nbsp;be&nbsp;sent&nbsp;in<br>
the&nbsp;same&nbsp;packet&nbsp;as&nbsp;the&nbsp;message&nbsp;headers&nbsp;if&nbsp;it&nbsp;is&nbsp;string,&nbsp;otherwise&nbsp;it&nbsp;is<br>
sent&nbsp;as&nbsp;a&nbsp;separate&nbsp;packet.</tt></dd></dl>

<dl><dt><a name="FGCPUnsecureRelayServer-putheader"><strong>putheader</strong></a>(self, header, *values)</dt><dd><tt>Send&nbsp;a&nbsp;request&nbsp;header&nbsp;line&nbsp;to&nbsp;the&nbsp;server.<br>
&nbsp;<br>
For&nbsp;example:&nbsp;h.<a href="#FGCPUnsecureRelayServer-putheader">putheader</a>('Accept',&nbsp;'text/html')</tt></dd></dl>

<dl><dt><a name="FGCPUnsecureRelayServer-putrequest"><strong>putrequest</strong></a>(self, method, url, skip_host<font color="#909090">=0</font>, skip_accept_encoding<font color="#909090">=0</font>)</dt><dd><tt>Send&nbsp;a&nbsp;request&nbsp;to&nbsp;the&nbsp;server.<br>
&nbsp;<br>
`method'&nbsp;specifies&nbsp;an&nbsp;HTTP&nbsp;request&nbsp;method,&nbsp;e.g.&nbsp;'GET'.<br>
`url'&nbsp;specifies&nbsp;the&nbsp;object&nbsp;being&nbsp;requested,&nbsp;e.g.&nbsp;'/index.html'.<br>
`skip_host'&nbsp;if&nbsp;True&nbsp;does&nbsp;not&nbsp;add&nbsp;automatically&nbsp;a&nbsp;'Host:'&nbsp;header<br>
`skip_accept_encoding'&nbsp;if&nbsp;True&nbsp;does&nbsp;not&nbsp;add&nbsp;automatically&nbsp;an<br>
&nbsp;&nbsp;&nbsp;'Accept-Encoding:'&nbsp;header</tt></dd></dl>

<dl><dt><a name="FGCPUnsecureRelayServer-send"><strong>send</strong></a>(self, data)</dt><dd><tt>Send&nbsp;`data'&nbsp;to&nbsp;the&nbsp;server.</tt></dd></dl>

<dl><dt><a name="FGCPUnsecureRelayServer-set_debuglevel"><strong>set_debuglevel</strong></a>(self, level)</dt></dl>

<dl><dt><a name="FGCPUnsecureRelayServer-set_tunnel"><strong>set_tunnel</strong></a>(self, host, port<font color="#909090">=None</font>, headers<font color="#909090">=None</font>)</dt><dd><tt>Sets&nbsp;up&nbsp;the&nbsp;host&nbsp;and&nbsp;the&nbsp;port&nbsp;for&nbsp;the&nbsp;HTTP&nbsp;CONNECT&nbsp;Tunnelling.<br>
&nbsp;<br>
The&nbsp;headers&nbsp;argument&nbsp;should&nbsp;be&nbsp;a&nbsp;mapping&nbsp;of&nbsp;extra&nbsp;HTTP&nbsp;headers<br>
to&nbsp;send&nbsp;with&nbsp;the&nbsp;CONNECT&nbsp;request.</tt></dd></dl>

<hr>
Data and other attributes inherited from <a href="httplib.html#HTTPConnection">httplib.HTTPConnection</a>:<br>
<dl><dt><strong>auto_open</strong> = 1</dl>

<dl><dt><strong>debuglevel</strong> = 0</dl>

<dl><dt><strong>default_port</strong> = 80</dl>

<dl><dt><strong>response_class</strong> = &lt;class httplib.HTTPResponse&gt;</dl>

<dl><dt><strong>strict</strong> = 0</dl>

</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
    
<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt><a name="-FGCPGetServerConnection"><strong>FGCPGetServerConnection</strong></a>(key_file<font color="#909090">='client.pem'</font>, region<font color="#909090">='de'</font>)</dt></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
    
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>FGCP_REGIONS</strong> = {'au': 'api.globalcloud.fujitsu.com.au', 'de': 'api.globalcloud.de.fujitsu.com', 'jp': 'api.oviss.jp.fujitsu.com', 'relay': 'relay', 'sg': 'api.globalcloud.sg.fujitsu.com', 'test': 'test', 'uk': 'api.globalcloud.uk.fujitsu.com', 'us': 'api.globalcloud.us.fujitsu.com'}</td></tr></table>
</body></html>